<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
    <title>报修信息</title>
    <meta name="decorator" content="default"/>
    <script type="text/javascript">
        function viewComment(href){
            top.$.jBox.open('iframe:'+href,'查看评论',$(top.document).width()-220,$(top.document).height()-120,{
                buttons:{"关闭":true},
                loaded:function(h){
                    $(".jbox-content", top.document).css("overflow-y","hidden");
                    $(".nav,.form-actions,[class=btn]", h.find("iframe").contents()).hide();
                    $("body", h.find("iframe").contents()).css("margin","10px");
                }
            });
            return false;
        }
        function page(n,s){
            $("#pageNo").val(n);
            $("#pageSize").val(s);
            $("#searchForm").submit();
            return false;
        }
    </script>
</head>
<body>
<ul class="nav nav-tabs">
    <li class="active"><a href="${ctx}/cms/businessRepairs/?office.id=${businessRepairs.office.id}">报修信息列表</a></li>
    <%--<shiro:hasPermission name="cms:classifiedInfo:edit"><li><a href="<c:url value='${fns:getAdminPath()}/cms/classifiedInfo/form?id=${classifiedInfo.id}&category.id=${classifiedInfo.category.id}'><c:param name='category.name' value='${classifiedInfo.category.name}'/></c:url>">分类信息添加</a></li></shiro:hasPermission>--%>
    <%--<shiro:hasPermission name="cms:article:edit"><li><a href="<c:url value='${fns:getAdminPath()}/cms/article/form?id=${article.id}&category.id=${article.category.id}'><c:param name='category.name' value='${article.category.name}'/></c:url>">文章添加</a></li></shiro:hasPermission>--%>
    <%--<shiro:hasPermission name="cms:cmsBusiness:edit"><li><a href="<c:url value='${fns:getAdminPath()}/cms/cmsBusiness/form?id=${cmsBusiness.id}&category.id=${cmsBusiness.category.id}'><c:param name='category.name' value='${cmsBusiness.category.name}'/></c:url>">商家信息添加</a></li></shiro:hasPermission>--%>
</ul>
<form:form id="searchForm" modelAttribute="businessRepairs" action="${ctx}/cms/businessRepairs/" method="post" class="breadcrumb form-search">
    <input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
    <input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
    <label>小区：</label><sys:treeselect id="office" name="office.id" value="${businessRepairs.office.id}" labelName="office.name" labelValue="${businessRepairs.office.name}"
                                      title="小区" url="/cms/office/treeData" module="businessRepairs" notAllowSelectRoot="false" cssClass="input-small"/>
    <%--<label>标题：</label><form:input path="title" htmlEscape="false" maxlength="50" class="input-small"/>&nbsp;--%>
    <input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/>&nbsp;&nbsp;
    <%--<label>状态：</label><form:radiobuttons onclick="$('#searchForm').submit();" path="delFlag" items="${fns:getDictList('cms_del_flag')}" itemLabel="label" itemValue="value" htmlEscape="false"/>--%>
</form:form>
<sys:message content="${message}"/>
<table id="contentTable" class="table table-striped table-bordered table-condensed">
    <%--<thead><tr><th>栏目</th><th>标题</th><th>权重</th><th>点击数</th><th>发布者</th><th>更新时间</th><th>操作</th></tr></thead>--%>
    <thead><tr><th>小区</th><th>名称</th><th>问题描述</th><th>手机</th><th>地址</th><th>创建时间</th><th>操作</th></thead>
        <%--<th>操作</th></tr>--%>
    <tbody>
    <c:forEach items="${page.list}" var="businessRepairs">
        <tr>
            <%--<td><a href="javascript:" onclick="$('#categoryId').val('${cmsBusiness.category.id}');$('#categoryName').val('${cmsBusiness.category.name}');$('#searchForm').submit();return false;">${cmsBusiness.category.name}</a></td>--%>
            <%--<td><a href="${ctx}/cms/cmsBusiness/form?id=${cmsBusiness.id}" title="${cmsBusiness.title}">${fns:abbr(cmsBusiness.title,40)}</a></td>--%>
            <td>${businessRepairs.office.name}</td>
            <td>${businessRepairs.name}</td>
            <td>${businessRepairs.trouble}</td>
            <td>${businessRepairs.mobile}</td>
            <td>${businessRepairs.address}</td>
            <td><fmt:formatDate value="${businessRepairs.createDate}" type="both"/></td>
                <%--<shiro:hasPermission name="cms:businessRepairs:edit">--%>
                    <%--<c:if test="${cmsBusiness.category.allowComment eq '1'}"><shiro:hasPermission name="cms:comment:view">--%>
                        <%--<a href="${ctx}/cms/comment/?module=cmsBusiness&contentId=${cmsBusiness.id}&delFlag=2" onclick="return viewComment(this.href);">评论</a>--%>
                    <%--</shiro:hasPermission></c:if>--%>
                    <%--<a href="${ctx}/cms/cmsBusiness/form?id=${cmsBusiness.id}">修改</a>--%>
                <td>
                    <shiro:hasPermission name="cms:businessRepairs:edit">
                        <a href="${ctx}/cms/businessRepairs/delete?id=${businessRepairs.id}${businessRepairs.delFlag ne 0?'&isRe=true':''}&office.id=${businessRepairs.office.id}" onclick="return confirmx('确认要${businessRepairs.delFlag ne 0?'发布':'删除'}该信息吗？', this.href)" >${businessRepairs.delFlag ne 0?'发布':'删除'}</a>
                    </shiro:hasPermission>
                </td>
                <%--</shiro:hasPermission>--%>
            <%--<td>--%>
                <%--<a href="${pageContext.request.contextPath}${fns:getFrontPath()}/view-${cmsBusiness.category.id}-${classifiedInfo.id}${fns:getUrlSuffix()}" target="_blank">访问</a>--%>
                <%--<shiro:hasPermission name="cms:cmsBusiness:edit">--%>
                    <%--<c:if test="${cmsBusiness.category.allowComment eq '1'}"><shiro:hasPermission name="cms:comment:view">--%>
                        <%--<a href="${ctx}/cms/comment/?module=cmsBusiness&contentId=${cmsBusiness.id}&delFlag=2" onclick="return viewComment(this.href);">评论</a>--%>
                    <%--</shiro:hasPermission></c:if>--%>
                    <%--<a href="${ctx}/cms/cmsBusiness/form?id=${cmsBusiness.id}">修改</a>--%>
                    <%--<shiro:hasPermission name="cms:cmsBusiness:audit">--%>
                        <%--<a href="${ctx}/cms/cmsBusiness/delete?id=${cmsBusiness.id}${cmsBusiness.delFlag ne 0?'&isRe=true':''}&categoryId=${cmsBusiness.category.id}" onclick="return confirmx('确认要${cmsBusiness.delFlag ne 0?'发布':'删除'}该信息吗？', this.href)" >${cmsBusiness.delFlag ne 0?'发布':'删除'}</a>--%>
                    <%--</shiro:hasPermission>--%>
                <%--</shiro:hasPermission>--%>
            <%--</td>--%>
        </tr>
    </c:forEach>
    </tbody>
</table>
<div class="pagination">${page}</div>
</body>
</html>